import config from "@/config"
import http from "@/utils/request"

export default {
  getArtWork: {
    url: `${config.API_URL}/cms/artwork/pageList`,
    name: "获取产品列表",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  artWorkDetail: {
    url: `${config.API_URL}/cms/artwork/info/`,
    name: "获取产品详情",
    get: async function(params){
      return await http.get(this.url+params)
    }
  },
  getMovie: {
    url: `${config.API_URL}/cms/common/movie/search`,
    name: "获取电影",
    get: async function(params){
      return await http.get(this.url,params)
    }
  },
  artWorkUpload: {
    url: `${config.API_URL}/cms/artwork/update`,
    name: "上传产品",
    post: async function(data = {}){
      return await http.post(this.url,data)
    }
  },
  artWorkCreate: {
    url: `${config.API_URL}/cms/artwork/create`,
    name: "新增产品",
    post: async function(data = {}){
      return await http.post(this.url,data)
    }
  },
  getLocale: {
    url: `${config.API_URL}/web/artwork/countries`,
    name: "获取全球地区",
    get: async function(params){
      return await http.get(this.url+params)
    }
  }
}